function output = FC_Property_Setup(mws, Frq)
    %myFun - Description
    %
    % Syntax: output = myFun(input)
    %
    % Long description

    %% 单位格式设置
    CMDs = '';
    CMDs = [CMDs 'With Units'];
    CMDs = [CMDs 10 '    .Geometry "um"'];
    CMDs = [CMDs 10 '    .Frequency "THz"'];
    CMDs = [CMDs 10 '    .Voltage "V"'];
    CMDs = [CMDs 10 '    .Resistance "Ohm"'];
    CMDs = [CMDs 10 '    .Inductance "H"'];
    CMDs = [CMDs 10 '    .Current "A"'];
    CMDs = [CMDs 10 '    .Conductance "Siemens"'];
    CMDs = [CMDs 10 '    .Capacitance "F"'];
    CMDs = [CMDs 10 '    .Time "ps"'];
    CMDs = [CMDs 10 '    .TemperatureUnit "kelvin"'];
    CMDs = [CMDs 10 'End With'];
    invoke(mws, 'AddToHistory', '设置单位', CMDs);

    %% 频率范围设置
    CMDs = '';
    CMDs = [CMDs 'Solver.FrequencyRange "',num2str(Frq(1)),'", "', num2str(Frq(2)), '"'];
    invoke(mws, 'AddToHistory', '设置频率范围', CMDs);

    %% 背景设置
    CMDs = '';
    CMDs = [CMDs 'With Background'];
    CMDs = [CMDs 10 '        .Type "Normal"'];
    CMDs = [CMDs 10 '        .Epsilon "1.0"'];
    CMDs = [CMDs 10 '        .Mu "1.0"'];
    CMDs = [CMDs 10 '        .Rho "1.204"'];
    CMDs = [CMDs 10 '        .ThermalType "Normal"'];
    CMDs = [CMDs 10 '        .ThermalConductivity "0.026"'];
    CMDs = [CMDs 10 '        .HeatCapacity "1.005"'];
    CMDs = [CMDs 10 '        .XminSpace "0.0"'];
    CMDs = [CMDs 10 '        .XmaxSpace "0.0"'];
    CMDs = [CMDs 10 '        .YminSpace "0.0"'];
    CMDs = [CMDs 10 '        .YmaxSpace "0.0"'];
    CMDs = [CMDs 10 '        .ZminSpace "0.0"'];
    CMDs = [CMDs 10 '        .ZmaxSpace "0.0"'];
    CMDs = [CMDs 10 'End With'];
    invoke(mws, 'AddToHistory', '设置背景', CMDs);

    %% 设置源和边界
    CMDs = '';
    CMDs = [CMDs 10 'With FloquetPort'];
    CMDs = [CMDs 10 '    .Reset'];
    CMDs = [CMDs 10 '    .SetDialogTheta "0"'];
    CMDs = [CMDs 10 '    .SetDialogPhi "0"'];
    CMDs = [CMDs 10 '    .SetSortCode "+beta/pw"'];
    CMDs = [CMDs 10 '    .SetCustomizedListFlag "False"'];
    CMDs = [CMDs 10 '    .Port "Zmin"'];
    CMDs = [CMDs 10 '    .SetNumberOfModesConsidered "2"'];
    CMDs = [CMDs 10 '    .Port "Zmax"'];
    CMDs = [CMDs 10 '    .SetNumberOfModesConsidered "2"'];
    CMDs = [CMDs 10 'End With'];

    CMDs = [CMDs 10 'MakeSureParameterExists "theta", "0"'];
    CMDs = [CMDs 10 'SetParameterDescription "theta", "spherical angle of incident plane wave"'];
    CMDs = [CMDs 10 'MakeSureParameterExists "phi", "0"'];
    CMDs = [CMDs 10 'SetParameterDescription "phi", "spherical angle of incident plane wave"'];
    CMDs = [CMDs 10 'With Boundary'];
    CMDs = [CMDs 10 '    .Xmin "unit cell"'];
    CMDs = [CMDs 10 '    .Xmax "unit cell"'];
    CMDs = [CMDs 10 '    .Ymin "unit cell"'];
    CMDs = [CMDs 10 '    .Ymax "unit cell"'];
    CMDs = [CMDs 10 '    .Zmin "expanded open"'];
    CMDs = [CMDs 10 '    .Zmax "expanded open"'];
    % CMDs = [CMDs 10 '    .Xsymmetry "none"'];
    % CMDs = [CMDs 10 '    .Ysymmetry "none"'];
    % CMDs = [CMDs 10 '    .Zsymmetry "none"'];
    % CMDs = [CMDs 10 '    .XPeriodicShift "0.0"'];
    % CMDs = [CMDs 10 '    .YPeriodicShift "0.0"'];
    % CMDs = [CMDs 10 '    .ZPeriodicShift "0.0"'];
    % CMDs = [CMDs 10 '    .PeriodicUseConstantAngles "False"'];
    % CMDs = [CMDs 10 '    .SetPeriodicBoundaryAngles "theta", "phi"'];
    % CMDs = [CMDs 10 '    .SetPeriodicBoundaryAnglesDirection "inward"'];
    % CMDs = [CMDs 10 '    .UnitCellFitToBoundingBox "True"'];
    % CMDs = [CMDs 10 '    .UnitCellDs1 "0.0"'];
    % CMDs = [CMDs 10 '    .UnitCellDs2 "0.0"'];
    % CMDs = [CMDs 10 '    .UnitCellAngle "90.0"'];
    CMDs = [CMDs 10 'End With'];
    invoke(mws, 'AddToHistory', '设置激励和边界条件', CMDs);

    %% 设置网格1
    CMDs = '';
    CMDs = [CMDs 'With Mesh'];
    CMDs = [CMDs 10 '  .MeshType "Tetrahedral"'];
    CMDs = [CMDs 10 'End With'];
    invoke(mws, 'AddToHistory', '设置网格', CMDs);

    %% 设置求解器
    CMDs = '';
    CMDs = [CMDs 'With FDSolver'];
    CMDs = [CMDs 10 ' .Reset'];
    CMDs = [CMDs 10 ' .Stimulation "List", "List"'];
    CMDs = [CMDs 10 ' .ResetExcitationList'];
    CMDs = [CMDs 10 ' .AddToExcitationList "Zmax", "TE(0,0);TM(0,0)"'];
    CMDs = [CMDs 10 ' .LowFrequencyStabilization "False"'];
    CMDs = [CMDs 10 'End With'];
    invoke(mws, 'AddToHistory', '设置求解器', CMDs);

    %% 设置求解器
    % CMDs = '';
    % CMDs = [CMDs 'ChangeSolverType "HF Frequency Domain" '];
    % CMDs = [CMDs 10 'With FDSolver'];
    % CMDs = [CMDs 10 '    .Reset'];

    % %% Mesh.SetCreator "High Frequency"

    % CMDs = [CMDs 10 '    .SetMethod "Tetrahedral", "General purpose"'];
    % CMDs = [CMDs 10 '    .OrderTet "Second"'];
    % CMDs = [CMDs 10 '    .OrderSrf "First"'];
    % CMDs = [CMDs 10 '    .Stimulation "All+Floquet", "All"'];
    % CMDs = [CMDs 10 '    .ResetExcitationList'];
    % CMDs = [CMDs 10 '    .AutoNormImpedance "False"'];
    % CMDs = [CMDs 10 '    .NormingImpedance "50"'];
    % CMDs = [CMDs 10 '    .ModesOnly "False"'];
    % CMDs = [CMDs 10 '    .ConsiderPortLossesTet "True"'];
    % CMDs = [CMDs 10 '    .SetShieldAllPorts "False"'];
    % CMDs = [CMDs 10 '    .AccuracyHex "1e-6"'];
    % CMDs = [CMDs 10 '    .AccuracyTet "1e-4"'];
    % CMDs = [CMDs 10 '    .AccuracySrf "1e-3"'];
    % CMDs = [CMDs 10 '    .LimitIterations "False"'];
    % CMDs = [CMDs 10 '    .MaxIterations "0"'];
    % CMDs = [CMDs 10 '    .SetCalcBlockExcitationsInParallel "True", "True", ""'];
    % CMDs = [CMDs 10 '    .StoreAllResults "False"'];
    % CMDs = [CMDs 10 '    .StoreResultsInCache "False"'];
    % CMDs = [CMDs 10 '    .UseHelmholtzEquation "True"'];
    % CMDs = [CMDs 10 '    .LowFrequencyStabilization "True"'];
    % CMDs = [CMDs 10 '    .Type "Auto"'];
    % CMDs = [CMDs 10 '    .MeshAdaptionHex "False"'];
    % CMDs = [CMDs 10 '    .MeshAdaptionTet "True"'];
    % CMDs = [CMDs 10 '    .AcceleratedRestart "True"'];
    % CMDs = [CMDs 10 '    .FreqDistAdaptMode "Distributed"'];
    % CMDs = [CMDs 10 '    .NewIterativeSolver "True"'];
    % CMDs = [CMDs 10 '    .TDCompatibleMaterials "False"'];
    % CMDs = [CMDs 10 '    .ExtrudeOpenBC "False"'];
    % CMDs = [CMDs 10 '    .SetOpenBCTypeHex "Default"'];
    % CMDs = [CMDs 10 '    .SetOpenBCTypeTet "Default"'];
    % CMDs = [CMDs 10 '    .AddMonitorSamples "True"'];
    % CMDs = [CMDs 10 '    .CalcPowerLoss "True"'];
    % CMDs = [CMDs 10 '    .CalcPowerLossPerComponent "False"'];
    % CMDs = [CMDs 10 '    .StoreSolutionCoefficients "True"'];
    % CMDs = [CMDs 10 '    .UseDoublePrecision "False"'];
    % CMDs = [CMDs 10 '    .UseDoublePrecision_ML "True"'];
    % CMDs = [CMDs 10 '    .MixedOrderSrf "False"'];
    % CMDs = [CMDs 10 '    .MixedOrderTet "False"'];
    % CMDs = [CMDs 10 '    .PreconditionerAccuracyIntEq "0.15"'];
    % CMDs = [CMDs 10 '    .MLFMMAccuracy "Default"'];
    % CMDs = [CMDs 10 '    .MinMLFMMBoxSize "0.3"'];
    % CMDs = [CMDs 10 '    .UseCFIEForCPECIntEq "True"'];
    % CMDs = [CMDs 10 '    .UseFastRCSSweepIntEq "false"'];
    % CMDs = [CMDs 10 '    .UseSensitivityAnalysis "False"'];
    % CMDs = [CMDs 10 '    .RemoveAllStopCriteria "Hex"'];
    % CMDs = [CMDs 10 '    .AddStopCriterion "All S-Parameters", "0.01", "2", "Hex", "True"'];
    % CMDs = [CMDs 10 '    .AddStopCriterion "Reflection S-Parameters", "0.01", "2", "Hex", "False"'];
    % CMDs = [CMDs 10 '    .AddStopCriterion "Transmission S-Parameters", "0.01", "2", "Hex", "False"'];
    % CMDs = [CMDs 10 '    .RemoveAllStopCriteria "Tet"'];
    % CMDs = [CMDs 10 '    .AddStopCriterion "All S-Parameters", "0.01", "2", "Tet", "True"'];
    % CMDs = [CMDs 10 '    .AddStopCriterion "Reflection S-Parameters", "0.01", "2", "Tet", "False"'];
    % CMDs = [CMDs 10 '    .AddStopCriterion "Transmission S-Parameters", "0.01", "2", "Tet", "False"'];
    % CMDs = [CMDs 10 '    .AddStopCriterion "All Probes", "0.05", "2", "Tet", "True"'];
    % CMDs = [CMDs 10 '    .RemoveAllStopCriteria "Srf"'];
    % CMDs = [CMDs 10 '    .AddStopCriterion "All S-Parameters", "0.01", "2", "Srf", "True"'];
    % CMDs = [CMDs 10 '    .AddStopCriterion "Reflection S-Parameters", "0.01", "2", "Srf", "False"'];
    % CMDs = [CMDs 10 '    .AddStopCriterion "Transmission S-Parameters", "0.01", "2", "Srf", "False"'];
    % CMDs = [CMDs 10 '    .SweepMinimumSamples "3"'];
    % CMDs = [CMDs 10 '    .SetNumberOfResultDataSamples "1001"'];
    % CMDs = [CMDs 10 '    .SetResultDataSamplingMode "Automatic"'];
    % CMDs = [CMDs 10 '    .SweepWeightEvanescent "1.0"'];
    % CMDs = [CMDs 10 '    .AccuracyROM "1e-4"'];
    % CMDs = [CMDs 10 '    .AddSampleInterval "", "", "1", "Automatic", "True"'];
    % CMDs = [CMDs 10 '    .AddSampleInterval "", "", "", "Automatic", "False"'];
    % CMDs = [CMDs 10 '    .MPIParallelization "False"'];
    % CMDs = [CMDs 10 '    .UseDistributedComputing "False"'];
    % CMDs = [CMDs 10 '    .NetworkComputingStrategy "RunRemote"'];
    % CMDs = [CMDs 10 '    .NetworkComputingJobCount "3"'];
    % CMDs = [CMDs 10 '    .UseParallelization "True"'];
    % CMDs = [CMDs 10 '    .MaxCPUs "128"'];
    % CMDs = [CMDs 10 '    .MaximumNumberOfCPUDevices "2"'];
    % CMDs = [CMDs 10 'End With'];

    % CMDs = [CMDs 10 'With IESolver'];
    % CMDs = [CMDs 10 '    .Reset'];
    % CMDs = [CMDs 10 '    .UseFastFrequencySweep "True"'];
    % CMDs = [CMDs 10 '    .UseIEGroundPlane "False"'];
    % CMDs = [CMDs 10 '    .SetRealGroundMaterialName ""'];
    % CMDs = [CMDs 10 '    .CalcFarFieldInRealGround "False"'];
    % CMDs = [CMDs 10 '    .RealGroundModelType "Auto"'];
    % CMDs = [CMDs 10 '    .PreconditionerType "Auto"'];
    % CMDs = [CMDs 10 '    .ExtendThinWireModelByWireNubs "False"'];
    % CMDs = [CMDs 10 'End With'];

    % CMDs = [CMDs 10 'With IESolver'];
    % CMDs = [CMDs 10 '    .SetFMMFFCalcStopLevel "0"'];
    % CMDs = [CMDs 10 '    .SetFMMFFCalcNumInterpPoints "6"'];
    % CMDs = [CMDs 10 '    .UseFMMFarfieldCalc "True"'];
    % CMDs = [CMDs 10 '    .SetCFIEAlpha "0.500000"'];
    % CMDs = [CMDs 10 '    .LowFrequencyStabilization "False"'];
    % CMDs = [CMDs 10 '    .LowFrequencyStabilizationML "True"'];
    % CMDs = [CMDs 10 '    .Multilayer "False"'];
    % CMDs = [CMDs 10 '    .SetiMoMACC_I "0.0001"'];
    % CMDs = [CMDs 10 '    .SetiMoMACC_M "0.0001"'];
    % CMDs = [CMDs 10 '    .DeembedExternalPorts "True"'];
    % CMDs = [CMDs 10 '    .SetOpenBC_XY "True"'];
    % CMDs = [CMDs 10 '    .OldRCSSweepDefintion "False"'];
    % CMDs = [CMDs 10 '    .SetAccuracySetting "Custom"'];
    % CMDs = [CMDs 10 '    .CalculateSParaforFieldsources "True"'];
    % CMDs = [CMDs 10 '    .ModeTrackingCMA "True"'];
    % CMDs = [CMDs 10 '    .NumberOfModesCMA "3"'];
    % CMDs = [CMDs 10 '    .StartFrequencyCMA "-1.0"'];
    % CMDs = [CMDs 10 '    .SetAccuracySettingCMA "Default"'];
    % CMDs = [CMDs 10 '    .FrequencySamplesCMA "0"'];
    % CMDs = [CMDs 10 '    .SetMemSettingCMA "Auto"'];
    % CMDs = [CMDs 10 'End With'];
    % invoke(mws, 'AddToHistory', '设置求解器', CMDs);
    %% 设置网格2
    % CMDs = '';
    % CMDs = [CMDs 'With MeshSetting'];
    % CMDs = [CMDs 10 '  .SetMeshType "Tet"'];
    % CMDs = [CMDs 10 '  .Set "Version", 1%'];
    % CMDs = [CMDs 10 'End With'];
    % invoke(mws, 'AddToHistory', '设置网格2-1', CMDs);
    CMDs = '';
    CMDs = [CMDs 'With Mesh'];
    CMDs = [CMDs 10 '  .MeshType "Tetrahedral"'];
    CMDs = [CMDs 10 'End With'];
    invoke(mws, 'AddToHistory', '设置网格2-2', CMDs);
    %% 再次设置求解器类型
    CMDs = '';
    CMDs = [CMDs 'With Mesh'];
    CMDs = [CMDs 10 '  ChangeSolverType("HF Frequency Domain")'];
    CMDs = [CMDs 10 'End With'];
    invoke(mws, 'AddToHistory', '切换求解器', CMDs);
    %% 定义材料
    Material_Lib
    % 2. 材料1 Gold设置

    invoke(mws, 'AddToHistory', '定义金', Gold);
    % 3. 材料2 HTL_YW 设置

    invoke(mws, 'AddToHistory', '定义HTL', HTL_YW);

end
